package com.qk.management.mapper;

import com.qk.dto.role.RoleDTO;
import com.qk.entity.Role;
import org.apache.ibatis.annotations.*;
import java.util.List;

@Mapper
public interface RoleMapper {

    Role selectByLabel(String roleLabel);

    @Update("update role set label=#{label},name=#{name},description=#{description} where id=#{id}")
    void update(Role role);
    @Select("select * from role where id=#{id}")
    Role getById(Integer id);
    @Delete("delete from role where id= #{id}")
    void insert(Role role);
    @Delete("delete from role where id= #{id}")
    void deleteById(Integer id);
    @Select("select * from role")
    List<Role> selectByPage(RoleDTO dto);
    @Select("select * from role")
    List<Role> selectAll();

}